<template>
  <div>
    <h1>信息提供者</h1>
    <input type="text" v-model="mess" />
    <button @click="sendMessage">发送消息</button>
  </div>
</template>

<script setup>
const mess = ref("");
const nuxtApp = useNuxtApp();
const sendMessage = () => {
  nuxtApp.$eventBus.emit("message", mess.value);
  mess.value = "";
};
</script>

<style lang="scss" scoped></style>
